const router = require('koa-router')()
const Mock = require('mockjs')
const { tab } = Mock.mock({
  "tab|20-50": [
    {
      title: "@ctitle(2)",
      id: "@id",
      "children|10-20": [
        {
          image: "@image(100x100, @color, image)",
          word: "@cword(2, 3)",
          id: "@id",
        },
      ],
    },
  ],
});

router.get('/tab', ctx => {
  ctx.body = {
    code: 200,
    data: tab
  }
})

module.exports = router
